﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>管理网站配置</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="../../CSS/bootstrap3.2/css/bootstrap.css" rel="stylesheet">
    <script src="../../Scripts/jquery-1.8.0.min.js"></script>
    <script src="../../Scripts/avalon.js"></script>
    <script src="../../Scripts/B2CCommon.js"></script>
    <script>
        var model = avalon.define({
            $id: "SiteSet",
            wzitem: { "ID": 1, "SiteName": "", "SiteTel": "", "SiteQQ": "", "SearchKey": "", "Alipay_No": "", "Alipay_PID": "", "Alipay_Key": "" },
            Savedata: function () {
                $.post("DLLAjaxHandler.ashx", { Action: "SaveSiteData", Data: JSON.stringify(model.wzitem.$model) }, function (data) {
                    if (data == "success") {
                        toastr.success("操作成功");
                    }
                });

            }
        })
        avalon.ready(function () {
            $.getJSON("../Comon/ComAjaxHandler.ashx", { Action: "GetJsonData", Table: "PT_Base_Site", QueryCondition: " AND ID=1" }, function (data) {
                if (data) {
                    model.wzitem = data[0];
                }
                else {
                }
            });
        })
    </script>
</head>
<body>
    <div class="container-fluid" ms-controller="SiteSet" style="margin-top: 20px">
        <form>
            <div class="form-group">
                <label>网站名称</label>
                <input type="text" class="form-control" ms-duplex="wzitem.SiteName" />
            </div>
            <div class="form-group">
                <label>网站电话</label>
                <input type="text" class="form-control" ms-duplex="wzitem.SiteTel" />
            </div>
            <div class="form-group">
                <label>网站QQ</label>
                <input type="text" class="form-control" ms-duplex="wzitem.SiteQQ" />
            </div>
            <div class="form-group">
                <label>关键字</label>
                <input type="text" class="form-control" ms-duplex="wzitem.SearchKey" />
            </div>
            <div class="form-group">
                <label>支付宝帐号</label>
                <input type="text" class="form-control" ms-duplex="wzitem.Alipay_No" />
            </div>
            <div class="form-group">
                <label>合作身份ID</label>
                <input type="text" class="form-control" ms-duplex="wzitem.Alipay_PID" />
            </div>
            <div class="form-group">
                <label>交易安全检验码</label>
                <input type="text" class="form-control" ms-duplex="wzitem.Alipay_Key" />
            </div>
            <a class="btn btn-info" href="#" ms-click="Savedata()">保存数据</a>
        </form>
    </div>
    <script src="../../JqueryPlug/Toast/toastr.js"></script>

</body>
</html>
